package com.cskaoyan.controller.wx.sl;

import com.cskaoyan.service.wx.sl.WxCommentService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.wx.sl.WxCommentCountVo;
import com.cskaoyan.vo.wx.sl.WxCommentListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WxCommentController {
    @Autowired
    WxCommentService wxCommentService;

    //显示评论列表
    @RequestMapping("wx/comment/list") //valueId=1181000&type=0&size=20&page=1&showType=0
    public BaseRespVo commentList(Integer valueId,byte type,Integer size,Integer page,Integer showType){
        WxCommentListVo wxCommentListVo = wxCommentService.commentList(valueId,type,size,page,showType);
        return BaseRespVo.ok(wxCommentListVo);
    }
    //显示评论总数
    @RequestMapping("wx/comment/count") //valueId=1181000&type=0
    public BaseRespVo commentCount(Integer valueId,byte type){
        WxCommentCountVo wxCommentCountVo = wxCommentService.commentCount(valueId,type);
        return BaseRespVo.ok(wxCommentCountVo);
    }
}
